package com.rsk.utils.common;


import java.util.Map;

/**
 * 非空校验工具类1.1
 * @author mayangrui
 *
 * @version 1.0
 */

@SuppressWarnings("rawtypes")
public class paramsUtils {

    public static String toString(Object object){
        return object == null ? "": object.toString();
    }

    public static boolean isEmpty(Map map){
        return map == null || map.isEmpty();
    }

    public static boolean isEmpty(String string){
        return toString(string).isEmpty();
    }

    public static boolean isEmptyTrim(String string){
        return toString(string).trim().isEmpty();
    }

    public static boolean isEmpty(Object object){
        return toString(object).isEmpty();
    }

    public static boolean isEmptyTrim(Object object){
        return toString(object).trim().isEmpty();
    }

    public static <T> boolean isEmpty(T[] array){
        return array == null || array.length == 0;
    }
}
